3.6 \(\int \frac{\cos (a+b x) \sin (a+b x)}{c+d x} \, dx\)

Optimal. Leaf size=65 \[ \frac{\sin \left (2 a-\frac{2 b c}{d}\right ) \text{CosIntegral}\left (\frac{2 b c}{d}+2 b x\right )}{2 d}+\frac{\cos \left (2 a-\frac{2 b c}{d}\right ) \text{Si}\left (\frac{2 b c}{d}+2 b x\right )}{2 d} \]

[Out]

(CosIntegral[(2*b*c)/d + 2*b*x]*Sin[2*a - (2*b*c)/d])/(2*d) + (Cos[2*a - (2*b*c)/d]*SinIntegral[(2*b*c)/d + 2*
b*x])/(2*d)

________________________________________________________________________________________

Rubi [A]  time = 0.139341, antiderivative size = 65, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {4406, 12, 3303, 3299, 3302} \[ \frac{\sin \left (2 a-\frac{2 b c}{d}\right ) \text{CosIntegral}\left (\frac{2 b c}{d}+2 b x\right )}{2 d}+\frac{\cos \left (2 a-\frac{2 b c}{d}\right ) \text{Si}\left (\frac{2 b c}{d}+2 b x\right )}{2 d} \]

Antiderivative was successfully verified.

[In]

Int[(Cos[a + b*x]*Sin[a + b*x])/(c + d*x),x]

[Out]

(CosIntegral[(2*b*c)/d + 2*b*x]*Sin[2*a - (2*b*c)/d])/(2*d) + (Cos[2*a - (2*b*c)/d]*SinIntegral[(2*b*c)/d + 2*
b*x])/(2*d)

Rule 4406

Int[Cos[(a_.) + (b_.)*(x_)]^(p_.)*((c_.) + (d_.)*(x_))^(m_.)*Sin[(a_.) + (b_.)*(x_)]^(n_.), x_Symbol] :> Int[E
xpandTrigReduce[(c + d*x)^m, Sin[a + b*x]^n*Cos[a + b*x]^p, x], x] /; FreeQ[{a, b, c, d, m}, x] && IGtQ[n, 0]
&& IGtQ[p, 0]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 3303

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Dist[Cos[(d*e - c*f)/d], Int[Sin[(c*f)/d + f*x]
/(c + d*x), x], x] + Dist[Sin[(d*e - c*f)/d], Int[Cos[(c*f)/d + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f},
x] && NeQ[d*e - c*f, 0]

Rule 3299

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinIntegral[e + f*x]/d, x] /; FreeQ[{c, d,
 e, f}, x] && EqQ[d*e - c*f, 0]

Rule 3302

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosIntegral[e - Pi/2 + f*x]/d, x] /; FreeQ
[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]

Rubi steps

\begin{align*} \int \frac{\cos (a+b x) \sin (a+b x)}{c+d x} \, dx &=\int \frac{\sin (2 a+2 b x)}{2 (c+d x)} \, dx\\ &=\frac{1}{2} \int \frac{\sin (2 a+2 b x)}{c+d x} \, dx\\ &=\frac{1}{2} \cos \left (2 a-\frac{2 b c}{d}\right ) \int \frac{\sin \left (\frac{2 b c}{d}+2 b x\right )}{c+d x} \, dx+\frac{1}{2} \sin \left (2 a-\frac{2 b c}{d}\right ) \int \frac{\cos \left (\frac{2 b c}{d}+2 b x\right )}{c+d x} \, dx\\ &=\frac{\text{Ci}\left (\frac{2 b c}{d}+2 b x\right ) \sin \left (2 a-\frac{2 b c}{d}\right )}{2 d}+\frac{\cos \left (2 a-\frac{2 b c}{d}\right ) \text{Si}\left (\frac{2 b c}{d}+2 b x\right )}{2 d}\\ \end{align*}

Mathematica [A]  time = 0.130577, size = 60, normalized size = 0.92 \[ \frac{\sin \left (2 a-\frac{2 b c}{d}\right ) \text{CosIntegral}\left (\frac{2 b c}{d}+2 b x\right )+\cos \left (2 a-\frac{2 b c}{d}\right ) \text{Si}\left (\frac{2 b c}{d}+2 b x\right )}{2 d} \]

Antiderivative was successfully verified.

[In]

Integrate[(Cos[a + b*x]*Sin[a + b*x])/(c + d*x),x]

[Out]

(CosIntegral[(2*b*c)/d + 2*b*x]*Sin[2*a - (2*b*c)/d] + Cos[2*a - (2*b*c)/d]*SinIntegral[(2*b*c)/d + 2*b*x])/(2
*d)

________________________________________________________________________________________

Maple [A]  time = 0.026, size = 84, normalized size = 1.3 \begin{align*}{\frac{1}{2\,d}{\it Si} \left ( 2\,bx+2\,a+2\,{\frac{-ad+bc}{d}} \right ) \cos \left ( 2\,{\frac{-ad+bc}{d}} \right ) }-{\frac{1}{2\,d}{\it Ci} \left ( 2\,bx+2\,a+2\,{\frac{-ad+bc}{d}} \right ) \sin \left ( 2\,{\frac{-ad+bc}{d}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(b*x+a)*sin(b*x+a)/(d*x+c),x)

[Out]

1/2*Si(2*b*x+2*a+2*(-a*d+b*c)/d)*cos(2*(-a*d+b*c)/d)/d-1/2*Ci(2*b*x+2*a+2*(-a*d+b*c)/d)*sin(2*(-a*d+b*c)/d)/d

________________________________________________________________________________________

Maxima [C]  time = 1.38025, size = 190, normalized size = 2.92 \begin{align*} -\frac{b{\left (i \, E_{1}\left (\frac{2 i \, b c + 2 i \,{\left (b x + a\right )} d - 2 i \, a d}{d}\right ) - i \, E_{1}\left (-\frac{2 i \, b c + 2 i \,{\left (b x + a\right )} d - 2 i \, a d}{d}\right )\right )} \cos \left (-\frac{2 \,{\left (b c - a d\right )}}{d}\right ) + b{\left (E_{1}\left (\frac{2 i \, b c + 2 i \,{\left (b x + a\right )} d - 2 i \, a d}{d}\right ) + E_{1}\left (-\frac{2 i \, b c + 2 i \,{\left (b x + a\right )} d - 2 i \, a d}{d}\right )\right )} \sin \left (-\frac{2 \,{\left (b c - a d\right )}}{d}\right )}{4 \, b d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)*sin(b*x+a)/(d*x+c),x, algorithm="maxima")

[Out]

-1/4*(b*(I*exp_integral_e(1, (2*I*b*c + 2*I*(b*x + a)*d - 2*I*a*d)/d) - I*exp_integral_e(1, -(2*I*b*c + 2*I*(b
*x + a)*d - 2*I*a*d)/d))*cos(-2*(b*c - a*d)/d) + b*(exp_integral_e(1, (2*I*b*c + 2*I*(b*x + a)*d - 2*I*a*d)/d)
 + exp_integral_e(1, -(2*I*b*c + 2*I*(b*x + a)*d - 2*I*a*d)/d))*sin(-2*(b*c - a*d)/d))/(b*d)

________________________________________________________________________________________

Fricas [A]  time = 0.470119, size = 213, normalized size = 3.28 \begin{align*} \frac{{\left (\operatorname{Ci}\left (\frac{2 \,{\left (b d x + b c\right )}}{d}\right ) + \operatorname{Ci}\left (-\frac{2 \,{\left (b d x + b c\right )}}{d}\right )\right )} \sin \left (-\frac{2 \,{\left (b c - a d\right )}}{d}\right ) + 2 \, \cos \left (-\frac{2 \,{\left (b c - a d\right )}}{d}\right ) \operatorname{Si}\left (\frac{2 \,{\left (b d x + b c\right )}}{d}\right )}{4 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)*sin(b*x+a)/(d*x+c),x, algorithm="fricas")

[Out]

1/4*((cos_integral(2*(b*d*x + b*c)/d) + cos_integral(-2*(b*d*x + b*c)/d))*sin(-2*(b*c - a*d)/d) + 2*cos(-2*(b*
c - a*d)/d)*sin_integral(2*(b*d*x + b*c)/d))/d

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sin{\left (a + b x \right )} \cos{\left (a + b x \right )}}{c + d x}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)*sin(b*x+a)/(d*x+c),x)

[Out]

Integral(sin(a + b*x)*cos(a + b*x)/(c + d*x), x)

________________________________________________________________________________________

Giac [C]  time = 1.20794, size = 768, normalized size = 11.82 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)*sin(b*x+a)/(d*x+c),x, algorithm="giac")

[Out]

1/4*(imag_part(cos_integral(2*b*x + 2*b*c/d))*tan(a)^2*tan(b*c/d)^2 - imag_part(cos_integral(-2*b*x - 2*b*c/d)
)*tan(a)^2*tan(b*c/d)^2 + 2*sin_integral(2*(b*d*x + b*c)/d)*tan(a)^2*tan(b*c/d)^2 + 2*real_part(cos_integral(2
*b*x + 2*b*c/d))*tan(a)^2*tan(b*c/d) + 2*real_part(cos_integral(-2*b*x - 2*b*c/d))*tan(a)^2*tan(b*c/d) - 2*rea
l_part(cos_integral(2*b*x + 2*b*c/d))*tan(a)*tan(b*c/d)^2 - 2*real_part(cos_integral(-2*b*x - 2*b*c/d))*tan(a)
*tan(b*c/d)^2 - imag_part(cos_integral(2*b*x + 2*b*c/d))*tan(a)^2 + imag_part(cos_integral(-2*b*x - 2*b*c/d))*
tan(a)^2 - 2*sin_integral(2*(b*d*x + b*c)/d)*tan(a)^2 + 4*imag_part(cos_integral(2*b*x + 2*b*c/d))*tan(a)*tan(
b*c/d) - 4*imag_part(cos_integral(-2*b*x - 2*b*c/d))*tan(a)*tan(b*c/d) + 8*sin_integral(2*(b*d*x + b*c)/d)*tan
(a)*tan(b*c/d) - imag_part(cos_integral(2*b*x + 2*b*c/d))*tan(b*c/d)^2 + imag_part(cos_integral(-2*b*x - 2*b*c
/d))*tan(b*c/d)^2 - 2*sin_integral(2*(b*d*x + b*c)/d)*tan(b*c/d)^2 + 2*real_part(cos_integral(2*b*x + 2*b*c/d)
)*tan(a) + 2*real_part(cos_integral(-2*b*x - 2*b*c/d))*tan(a) - 2*real_part(cos_integral(2*b*x + 2*b*c/d))*tan
(b*c/d) - 2*real_part(cos_integral(-2*b*x - 2*b*c/d))*tan(b*c/d) + imag_part(cos_integral(2*b*x + 2*b*c/d)) -
imag_part(cos_integral(-2*b*x - 2*b*c/d)) + 2*sin_integral(2*(b*d*x + b*c)/d))/(d*tan(a)^2*tan(b*c/d)^2 + d*ta
n(a)^2 + d*tan(b*c/d)^2 + d)